
<div class="clearfix">
	<div class="n-size-small n-box-float">
	<dl class="n-box n-sep-top n-sep">
		<dt class="n-box-head">插件接口</dt>
		<dd class="n-box-body" style="line-height: 24px;padding:10px;">
		<?php
		if(!empty($data['apilist'])){
		foreach($data['apilist'] as $key=>$val){
		?>
		<a href="<?=n_url('open','view',array('id'=>$val['id']))?>">
			<?=$val['paction']?>:<?=$val['title']?>
		</a><br />
		
		<?php
		}
		}
		?>
			
		</dd>
	</dl>
	</div>
	<div class="n-size-big n-box-float">
		<dl class="n-box n-sep-top n-sep">
			<dt class="n-box-head">
				插件信息
			</dt>
			<dd class="n-box-body" style="line-height: 24px;padding:10px;">
				插件名:<?=$data['main']['pname']?><br />
				插件码:<?=$data['main']['pevent']?><br />
				描述:<?=$data['main']['descript']?><br />
				负责人:<?=n_api("member")->getAval($data['main']['ppuid_dev'],'uname')?><br />
			</dd>
		</dl>

		<dl class="n-box n-sep-top n-sep">
			<dt class="n-box-head">
				接口属性
				<?=n_ui(n_url('open','apiEdit',array('id'=>$data['api']['id'])),'修改')?>
			</dt>
			<dd class="n-box-body" style="padding:10px;">
				<div class="n-notice">入口</div>
					/open/<?=$data['main']['pevent']?>/<?=$data['api']['paction']?>.html
				
				<div class="n-notice n-sep-top">标题</div>
					<?=$data['api']['title']?>					
					
				<div class="n-notice n-sep-top">数据格式</div>
					<?php
					if(in_array($data['api']['data_format'],array('JSON','BOTH'))){
						echo "JSON<br>";
					}
					if(in_array($data['api']['data_format'],array('XML','BOTH'))){
						echo "XML";
					}					
					?>

				<div class="n-notice n-sep-top">请求方式</div>
					<?php
					if(in_array($data['api']['data_format'],array('POST','BOTH'))){
						echo "POST<br>";
					}
					if(in_array($data['api']['data_format'],array('GET','BOTH'))){
						echo "GET";
					}					
					?>

				<div class="n-notice n-sep-top">请求示例</div>
					<?=nl2br($data['api']['request_example'])?>

				<div class="n-notice n-sep-top">响应示例</div>
					<?=nl2br($data['api']['respond_example'])?>

				<div class="n-notice n-sep-top">注意事项</div>
					<?=nl2br($data['api']['notice'])?>		
			</dd>
		</dl>

		<div class="n-sep">
		<dl class="n-box">
			<dt class="n-box-head">
				参数
				<?=n_ui(n_url('open','fieldEdit',array('apiId'=>$data['api']['id'])),'添加')?>
			</dt>
			<dd class="n-box-body">
			<table class="n-table n-size-full">
				<tr>
					<th width="100">字段</th>
					<th width="40">类型</th>
					<th width="40">必填</th>
					<th>说明</th>
					<th>示例</th>
				</tr>
				<?php
				if(!empty($data['field'])){
				foreach($data['field'] as $key=>$val){
				?>
				<tr>
					<td>
						<?=$val['kname']?>
						<?=n_ui(n_url('open','fieldEdit',array('id'=>$val['id'])),'修改')?>
						<?=n_ui(n_url('open','fieldDel',array('id'=>$val['id'])),'删除')?>
					</td>
					<td><?=$val['vtype']?></td>
					<td><?=$val['isignore']?></td>
					<td><?=$val['descript']?></td>
					<td><?=$val['val_example']?></td>
				</tr>
				
				<?php
				}
				}
				?>
			</table>
				
			</dd>
		</dl>
		</div>

		<div class="n-sep">
		<dl class="n-box">
			<dt class="n-box-head">更新日志</dt>
			<dd class="n-box-body">
				<table class="n-table n-size-full">
					<tr>
						<th>修改人</th>
						<th>说明</th>
						<th>更新时间</th>
					</tr>
					<?php
					$mHandle = n_api("member");
					if(!empty($data['log'])){
					foreach($data['log'] as $key=>$val){
					?>
					<tr>
						<td><?=$mHandle->getAval($val['ppid'],'uname')?></td>
						<td><?=$val['descript']?></td>
						<td><?=date('Y-m-d H:i:s',$val['ctime'])?></td>
					</tr>
					
					<?php
					}
					}
					?>
				</table>
				
			</dd>
		</dl>
		</div>
	</div>

</div>		
